package cn.wolfcode.trip.app.controller;

import cn.wolfcode.trip.base.domain.StrategyContent;
import cn.wolfcode.trip.base.domain.StrategyDetail;
import cn.wolfcode.trip.base.service.IStrategyContentService;
import cn.wolfcode.trip.base.service.IStrategyDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("strategyDetails")
public class StrategyDetailController {
    @Autowired
    private IStrategyContentService contentService;
    @Autowired
    private IStrategyDetailService detailService;

     /** 根据明细的id查询攻略信息数据
     * @param detailId
     * @return
     */
    @GetMapping("{detailId}")
    public StrategyDetail getStrategyById(@PathVariable("detailId") Long detailId){
       return detailService.selectByDetailId(detailId);
    }

}
